﻿
Partial Class identification
    Inherits System.Web.UI.Page



    Protected Sub BtnConnect_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnConnect.Click
        Dim resultat, data() As String
        Dim USERLOG As New USER.user
        USERLOG.Timeout = -1
        USERLOG.Url = Application("WSSECURITE")
        Try
            resultat = USERLOG.Identification(TextBoxId.Text, TextBoxPwd.Text)
            data = resultat.Split("/")
            If data(0) = "IDOK" Then
                Session("droit") = data(1)
                Session("type") = data(2)
                Session("nom") = data(3)
                Session("prenom") = data(4)
                Session("samuref") = data(5)
                Response.Redirect("default.aspx")
            End If
        Catch ex As Exception
            TextBoxId.Text = ""
            TextBoxPwd.Text = ""
        End Try
    End Sub

End Class

